package com.liuyan.dao;

import com.liuyan.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


public interface IUserDao {

    User selectByPrimaryKey(Integer id);

    /**
     * 用户登录
     * @param userName
     * @param password
     * @return
     */
    User getUserPass(@Param("userName")String userName,@Param("password")String password);

    /**
     *验证用户是否存在
     * @param userName
     * @return
     */
    User isHave(@Param("userName")String userName);


    /**
     * 用户注册
     */
    int addUser(User user);


    User getUser(@Param("userName")String userName);


    int modifyPassword(User user);

    /**
     * 更改头像
     * @param user
     * @return
     */
    int modifyHead(User user);

    List<User> getUserList();

    User getPwdCheck(User user);
}